<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>面试结果</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 40px;
            background-color: #f0f2f5;
        }
        .container {
            background-color: #fff;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            max-width: 800px;
            margin: 0 auto;
        }
        h2 {
            text-align: center;
            color: #333;
        }
        .response {
            white-space: pre-wrap;
            background-color: #f5f5f5;
            padding: 20px;
            border-radius: 5px;
            margin: 20px 0;
        }
        .button {
            display: inline-block;
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            text-decoration: none;
            border-radius: 5px;
            margin-right: 10px;
        }
        .button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
<div class="container">
    <h2>AI 面试结果</h2>

    <div th:if="${fileName}">
        <p>已处理文件: <strong th:text="${fileName}"></strong></p>
    </div>

    <div class="response" th:text="${aiResponse}"></div>

    <div>
        <a href="/interview" class="button">返回面试页</a>

        <!-- 退出登录表单 -->
        <form th:action="@{/logout}" method="post" style="display: inline;">
            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
            <button type="submit" style="background: none; border: none; color: #007bff; text-decoration: underline; cursor: pointer;">
                退出登录
            </button>
        </form>
    </div>
</div>
</body>
</html>